package com.woniu.micropropertyserver.housemag.service;

import com.github.pagehelper.PageInfo;
import com.woniu.microcommonsserver.entity.HouseChangeInfoEntity;
import com.woniu.microcommonsserver.entity.HouseInfoEntity;
import com.woniu.microcommonsserver.entity.SpaceInfoEntity;
import com.woniu.microcommonsserver.param.PageRequest;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author ：pengchufeng
 * @date ：Created in 2021/2/1
 * @description：房产service接口
 */
public interface IHouseService {
    /**
     * 条件查询所有房间信息
     * @return
     */
    PageInfo<HouseInfoEntity> findBy(@Param("p") PageRequest request, @Param("house")HouseInfoEntity houseInfoEntity);

    /**
     * 条件查询所有房间变更信息
     * @return
     */
    List<HouseChangeInfoEntity> findChange(@Param("id")String id);

    /**
     * 绑定
     * @return
     */
    boolean bind(@Param("hid")String hid,@Param("uid")String uid,@Param("name")String name,@Param("phone")String phone);

    /**
     * 取绑
     * @return
     */
    boolean unbind(@Param("hid")String hid);

    /**
     * 换绑
     * @return
     */
    boolean cBind(@Param("hid")String hid,@Param("uid")String uid,@Param("name")String name,@Param("phone")String phone);

    /**
     * 添加记录
     * @return
     */
    boolean addChange(@Param("hc")HouseChangeInfoEntity houseChangeInfoEntity);
   //根据业主id查房产
    List<HouseInfoEntity> findByCard(String cardId);


}
